<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" type="text/css" th:href="@{/h-ui/css/H-ui.min.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/h-ui.admin/css/H-ui.admin.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/lib/Hui-iconfont/1.0.8/iconfont.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/h-ui.admin/skin/default/skin.css}" id="skin" />
    <link rel="stylesheet" type="text/css" th:href="@{/h-ui.admin/css/style.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/lib/layui/css/layui.css}" />
    <title>资讯列表</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 博客管理 <span class="c-gray en">&gt;</span> 博客列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <div class="text-c">
        <input type="text" name="" id="keyWords" th:value="${page.get('keyWords')}" placeholder="按标题搜索" style="width:250px" class="input-text">
        <button name="" id="" class="btn btn-success" onclick="adminBlog.serach('/article/list','keyWords')"><i class="Hui-iconfont">&#xe665;</i> 搜博客</button>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"> <a class="btn btn-primary radius" data-title="添加博客"  onclick="adminBlog.addView('/article/addView')" ><i class="Hui-iconfont">&#xe600;</i> 添加博客</a></span> <span class="r">共有数据：<strong th:text="${page.get('total')}"></strong> 条</span> </div>
    <div class="mt-20">
        <table class="table table-border table-bordered table-bg table-hover table-sort table-responsive" id="blogTable">
            <thead>
            <tr class="text-c">
                <th width="25"><input type="checkbox" name="" value=""></th>
                <th width="80">ID</th>
                <th>标题</th>
                <th width="80">内容</th>
                <th width="80">浏览次数</th>
                <th width="120">类型</th>
                <th width="60">发布状态</th>
                <th width="75">发布时间</th>
                <th width="120">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr class="text-c" th:each="article : ${page.get('list')}">
                <td width="10"><input type="checkbox" th:value="${article.id}"/></td>
                <td width="5" th:text="${article.id}" id="id">java</td>
                <td width="100"  th:text="${article.title}">java</td>
                <td width="150"  th:text="${article.simpleContent}">测试</td>
                <td width="30"  th:text="${article.readNum}">50</td>
                <td width="20" th:text="${article.type.typeName}"></td>

                <span th:if="${article.statu == 0}">
                     <td width="30" align="center"><span class="label label-success radius">草稿</span></td>
                </span>
                <span th:if="${article.statu == 1}">
                     <td width="30" align="center"><span class="label label-success radius">已发布</span></td>
                </span>

                <td width="120" style="text-align: center;height: 30px;line-height: 30px;" th:text="${#dates.format(article.createTime,'yyyy-MM-dd HH:mm:ss')}">2018/10/25 16:00:01</td>

                <span th:if="${article.statu == 0}">
                     <td class="f-14 td-manage"><a style="text-decoration:none" onClick="adminBlog.openCongitm('发布',this,'/article/publish')" href="javascript:;" title="发布">发布</a> <a style="text-decoration:none" class="ml-5" onClick="adminBlog.edit(this,'/article/edit')" href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a> <a style="text-decoration:none" class="ml-5" onClick="adminBlog.openCongitm('删除',this,'/article/del')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a></td>
                </span>
                <span th:if="${article.statu == 1}">
                     <td class="f-14 td-manage"> <a style="text-decoration:none" class="ml-5" onClick="adminBlog.openCongitm('删除',this,'/article/del')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a></td>
                </span>
            </tr>
            </tbody>
        </table>
        <input type="hidden" id="total" th:value="${page.get('total')}"/>
        <input type="hidden" id="curr" th:value="${page.get('curr')}"/>
        <div id="page" style="float: right"></div>
    </div>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" th:src="@{/js/jquery-2.0.3.min.js}"></script>
<script type="text/javascript" th:src="@{/layer/layer.js}"></script>
<script type="text/javascript" th:src="@{/h-ui/js/H-ui.min.js}"></script>
<script type="text/javascript" th:src="@{/h-ui.admin/js/H-ui.admin.js}"></script> <!--/_footer 作为公共模版分离出去-->
<script type="text/javascript" th:src="@{/lib/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/lib/laypage/1.2/laypage.js}"></script>
<script type="text/javascript" th:src="@{/js/admin/admin.js}"></script>

<script type="text/javascript">
       adminBlog.page("/article/list");
</script>
</body>
</html>